<div nz-col [nzMd]="24" style="margin-top: 24px">
    <nz-card nzTitle="新建项目">
        <form nz-form>
            <div nz-form-item nz-row>
                <div nz-col [nzSpan]="4">

                </div>
                <div nz-col [nzSpan]="16">
                    <div nz-form-label nz-col [nzSpan]="6" [nzSm]="4">
                        <label nz-form-item-required>项目名称</label>
                    </div>
                    <div nz-form-control nz-col [nzSpan]="18" [nzSm]="20">
                        <nz-input [(ngModel)]="data.p_name" name="name" [nzPlaceHolder]="'请输入项目名称'"></nz-input>
                    </div>
                </div>
            </div>
            <div nz-form-item nz-row>
                <div nz-col [nzSpan]="4">

                </div>
                <div nz-col [nzSpan]="16">
                    <div nz-form-label nz-col [nzSpan]="6" [nzSm]="4">
                        <label nz-form-item-required>项目图片</label>
                    </div>
                    <div nz-form-control nz-col [nzSm]="20" style="margin-top: -5px">
                        <button nz-button class="file-upload mt-sm" >
                            <input id="file1" accept type="file" (change)="fileChange($event)" />
                            <i class="anticon anticon-upload"></i><span>上传图片</span>
                        </button>
                    </div>

                </div>
            </div>
            <div nz-form-item nz-row>
                <div nz-col [nzSpan]="4">

                </div>
                <div nz-col [nzSpan]="16">
                    <div nz-form-label nz-col [nzSpan]="6" [nzSm]="4">

                    </div>
                    <div nz-form-control nz-col [nzSm]="20" style="margin-top: -5px">
                        <div nz-form-control nz-col [nzSm]="20" style="margin-top: -5px">
                            <div nz-form-control nz-col [nzSm]="8">
                                <img [src]="(data.p_image ? (IP_PORT ? (IP_PORT + data.p_image) : data.p_image) : data.p_image) || './assets/img/default-img.png'" style="width: 100px;height: auto;">
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div nz-form-item nz-row>
                <div nz-col [nzSpan]="4">

                </div>
                <div nz-col [nzSpan]="16">
                    <div nz-form-label nz-col [nzSpan]="6" [nzSm]="4">
                        <label nz-form-item-required>宽度</label>
                    </div>
                    <div nz-form-control nz-col [nzSpan]="12" [nzSm]="20">
                        <nz-input-number [(ngModel)]="data.p_width" name="width"></nz-input-number>
                    </div>
                </div>
            </div>
            <div nz-form-item nz-row>
                <div nz-col [nzSpan]="4">

                </div>
                <div nz-col [nzSpan]="16">
                    <div nz-form-label nz-col [nzSpan]="6" [nzSm]="4">
                        <label nz-form-item-required>高度</label>
                    </div>
                    <div nz-form-control nz-col [nzSpan]="12" [nzSm]="20">
                        <nz-input-number [(ngModel)]="data.p_height" name="height"></nz-input-number>
                    </div>
                </div>
            </div>

            <div nz-form-item nz-row *ngIf="role!=3">
                <div nz-col [nzSpan]="4">

                </div>
                <div nz-col [nzSpan]="16">
                    <div nz-form-label nz-col [nzSpan]="6" [nzSm]="4">
                        <label nz-form-item-required>选择专业</label>
                    </div>
                    <div nz-form-control nz-col [nzSpan]="12" [nzSm]="20">
                        <div>
                            <button style="margin-left: 0;margin-right:10px;" nz-button [nzType]="'default'"  *ngFor="let cla of glMajList;let i = index" (click)="getClassByMajId(i)">{{ cla }}</button>
                        </div>
                        <ul style="border: 1px solid #ddd;max-height: 120px;overflow-y: auto;padding:10px;padding-bottom:0;width: 500px;margin-top:10px;min-height: 28px">
                            <li style="float:left;margin:0 10px 10px 10px" *ngFor="let major of this.majorList">
                                <input type="checkbox"  id="{{'mid'+ major.maj_id }}"
                                       style="vertical-align: middle;margin-right: 5px;" (change)="majChange($event,major)" [checked]="major.ischeck"/>
                                <label style="vertical-align: middle" for="{{'mid'+ major.maj_id }}">{{major.major_name}}</label>
                            </li>

                        </ul>
                    </div>
                </div>
            </div>

            <div nz-form-item nz-row *ngIf="role!=3">
                <div nz-col [nzSpan]="4">

                </div>
                <div nz-col [nzSpan]="16">
                    <div nz-form-label nz-col [nzSpan]="6" [nzSm]="4">
                        <label nz-form-item-required>选择班级</label>
                    </div>
                    <div nz-form-control nz-col [nzSpan]="12" [nzSm]="20">
                        <div>
                            <span *ngFor="let cla of glClaList" style="line-height:26px;padding:2px 5px;border:1px solid #ddd;margin-right:10px;cursor: default;margin-bottom: 10px;display: inline-block;border-radius:2px;" >{{ cla }}</span>
                        </div>
                        <ul style="border: 1px solid #ddd;max-height: 120px;overflow-y: auto;padding:10px;padding-bottom:0;width: 500px;min-height: 28px;margin-top:10px;">
                            <li style="float:left;margin:0 20px 10px 10px" *ngFor="let cla of classList">
                                <input type="checkbox"  id="{{'cid'+ cla.cla_id }}"
                                       style="vertical-align: middle;margin-right: 5px;" (change)="clChange($event,cla)" [checked]="cla.ischeck"/>
                                <label for="{{'cid'+ cla.cla_id }}">{{cla.cla_name}}</label>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>

            <div nz-form-item nz-row>
                <div nz-col [nzSpan]="4">

                </div>
                <div nz-col [nzSpan]="16">
                    <div nz-form-label nz-col [nzSpan]="6" [nzSm]="4">
                        <label nz-form-item-required>项目类型</label>
                    </div>
                    <div nz-form-control nz-col [nzSpan]="12" [nzSm]="20">
                        <nz-select style="width: 100px;" [(ngModel)]="data.p_type" name="p_type">
                            <nz-option
                                *ngFor="let option of type"
                                [nzLabel]="option.label"
                                [nzValue]="option">
                            </nz-option>
                        </nz-select>
                    </div>
                </div>
            </div>

            <div nz-form-item nz-row>
                <div nz-col [nzSpan]="4">

                </div>
                <div nz-col [nzSpan]="16">
                    <div nz-form-label nz-col [nzSpan]="6" [nzSm]="4">
                        <label nz-form-item-required>流程类型</label>
                    </div>
                    <div nz-form-control nz-col [nzSpan]="12" [nzSm]="20">
                        <nz-select [nzDisabled]="process_disabled" style="width: 100px;" [(ngModel)]="data.process_type" name="process_type">
                            <nz-option
                                *ngFor="let option of process_type"
                                [nzLabel]="option.label"
                                [nzValue]="option">
                            </nz-option>
                        </nz-select>
                    </div>
                </div>
            </div>

            <div nz-form-item nz-row>
                <div nz-col [nzSpan]="4">

                </div>
                <div nz-col [nzSpan]="16">
                    <div nz-form-label nz-col [nzSpan]="6" [nzSm]="4">
                        <label nz-form-item-required>项目描述</label>
                    </div>
                    <div nz-form-control nz-col [nzSpan]="18" [nzSm]="20">
                        <nz-input [nzType]="'textarea'" style="height: 100px;" [(ngModel)]="data.p_description" name="description" [nzPlaceHolder]="'请输入项目描述'"></nz-input>
                    </div>
                </div>
            </div>
            <div nz-form-item nz-row>
                <div nz-col [nzSpan]="6">

                </div>
                <div nz-col [nzSpan]="16">
                    <div nz-form-item nz-row class="mb0">
                        <div nz-form-control nz-col [nzSpan]="14" [nzXs]="24" [nzOffset]="6">
                            <button nz-button [nzType]="'primary'" (click)="save()">保存</button>
                            <button nz-button [nzType]="'primary'" (click)="next()">下一步</button>
                            <button nz-button [nzType]="'warning'" (click)="cancel()">取消</button>
                        </div>
                    </div>
                </div>
            </div>
        </form>
    </nz-card>
</div>
